1. Field of the Invention
The present invention relates to an error detection code generating circuit, an encoding circuit utilizing which and related methods thereof, and particularly relates to an optical data error detection code generating circuit, an encoding circuit utilizing which and related methods thereof.
2. Description of the Prior Art
Conventionally, a DVD optical disc comprises continuous error correction code block (ECC block), and a DVD optical disc includes at least 143500 ECC blocks, which is illustrated as conform tos. FIG. 1 is a schematic diagram illustrating the ECC block 100 in a DVD optical disc. As shown in FIG. 1, each ECC block has 208 (192+16) rows, and each of them has 182 bytes (172+10). The first 172 bytes of each row is used for storing data to be recorded to the optical disc, and the information stored in the last 10 bytes is the PI (Parity of the Inner code). Also, the last 16 rows of each ECC block are called PO (Parity of the Outer code). Briefly, PI and PO are the checking codes for reading data recoded to the optical disc correctly. One method to generate PI and PO is utilizing Reed-Solomon codes.
Besides, the ECC block 100 includes 16 sectors (only sectors 101, 102, and 103 are illustrated). Each sector includes 2048 bytes of main data, 12 bytes of header and 4 bytes of error detection code (EDC). The header always includes 1 byte of sector information, 3 bytes of ID number, 2 bytes of IED (the EDC, error detection code, of the ID number), and 6 bytes of other information (CPRMAI).
Conventionally, an optical encoding system has a memory unit, a bus, a transmitting interface, a scrambler, a header generator, an EDC generator and an encoder, wherein the transmitting interface, the scrambler, the header generator, the EDC generator and the encoder are respectively coupled to the memory unit. The transmission interface can be ATAPI (Advanced Technology Attachment/ATA packet Interface, which is instituted by team X3T1Q of American National Standards Institute). The transmission interface is utilized to receive main data and transmit it to the memory unit; the scrambler is utilized for scrambling the main data; the header generator is utilized for receiving head information to generate a header, the EDC generator is utilized for generating EDC according to the main data and header; and the encoder is utilized to perform encoding for PI/PO encoding according to the header, main data and EDC. The disadvantage of such a system is that the scrambler must read and write back data of whole sector, and therefore, large bandwidth is needed. Additionally, according to structure of the optical disc encoding system, the EDC generator needs to read a whole sector to generate only 4 bytes EDC, which is inefficient.